package com.freeLearning.boot.course.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("course_review")
public class CourseReview {
    /**
     * 主键ID
     */
    @Schema(description = "ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 课程ID
     */
    @Schema(description = "课程ID")
    private Long courseId;

    @Schema(description = "课程名称")
    private String courseName;
    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 咨询师 id
     */
    @Schema(description = "咨询师 id")
    private Long consultantId;
    /**
     * 咨询师名称
     */
    @Schema(description = "咨询师名称")
    private String consultantName;
    /**
     * 评分（1-5）
     */
    @Schema(description = "评分（1-5）")
    private Byte rating;

    /**
     * 评价内容
     */
    @Schema(description = "评价内容")
    private String comment;

    /**
     * 评价时间
     */
    @Schema(description = "评价时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime reviewTime;

    /**
     * 用户昵称
     */
    @Schema(description = "用户昵称")
    private String nickName;

    /**
     * 用户头像
     */
    @Schema(description = "用户头像")
    private String avatar;

    /**
     * 审核状态
     * 0：待审核
     * 1：审核通过
     * 2：审核未通过
     */
    @Schema(description = "审核状态")
    private Integer status;

    /**
     * 点赞数量
     */
    @Schema(description = "点赞数量")
    private Integer likeCount;

    @Schema(description = "审核信息")
    private String auditInfo;

}
